<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/base.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/info-reg.css" />
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js">
</script>
<title>移动办公自动化系统</title>
<script type="text/javascript">
	function showMan(){
		var val=window.showModalDialog("lyk/Personoffice/Contact/showName.jsp","","");
		var valarrays=val.split("/");
		var name=valarrays[0];
		var recordid=valarrays[1];
		$("#uname").val(name);
		$("#recordid").val(recordid);
		
		$.ajax({
			type:"post",
			url:"ContactManager.action?method=ajaxsearch&recordid="+recordid,
			success:function(user){
					$("#phone").val(user.userPhone);
					$("#sphone").val(user.userBackupPhone);
					$("#email").val(user.userEmail);
				}
			});
	}
</script>
</head>

<body>
<div class="title"><h2>增加通讯录</h2></div>
<div class="main">
<form name="form1" method="post" action="ContactManager.action?method=save">
<input type="hidden" name="recordid" id="recordid"/>"
	<table>
    <tr><td>
    <p class="long-input ue-clear">
    	<label>姓名：</label></p></td>
        <td><p class="short-input ue-clear"><input type="text" name="uname" id="uname" placeholder="请选择联系人" />
        <button type="button" onclick="showMan();">选择</button>
    </p></td></tr>
    <tr><td>
    <p class="long-input ue-clear">
    	<label>电话：</label></p></td>
        <td><p class="short-input ue-clear"><input type="text" name="phone" id="phone" placeholder="请输入电话" />
    </p></td></tr>
    <tr><td>
    <p class="long-input ue-clear">
    	<label>备用电话：</label></p></td>
        <td><p class="short-input ue-clear"><input type="text" name="sphone" id="sphone" placeholder="请输入备用电话" />
    </p></td></tr>
    <tr><td>
    <p class="long-input ue-clear">
    	<label>QQ：</label></p></td>
        <td><p class="short-input ue-clear"><input type="text" name="qq" placeholder="请输入QQ号码" />
    </p></td></tr>
    <tr><td>
    <p class="long-input ue-clear">
    	<label>邮箱：</label></p></td>
        <td><p class="short-input ue-clear"><input type="text" name="email" id="email" placeholder="请输入邮箱" />
    </p></td></tr>

	</table>
	    <div class="btn ue-clear">
	<a href="javascript:document.form1.submit();" class="confirm">确定</a>
    <a href="javascript:history.back();" class="clear">返回</a>
	</div>
</form>
</div>
</body>
</html>


